﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;

namespace Statistic
{
    public class XmlWriter
    {
        /**
         * Writes to xml file
         * @param advs
         *   List with advertisement objects
         */
        XmlDocument doc = new XmlDocument();
        public void WriteToXml(string xmlValue)
        {
            doc.LoadXml(xmlValue);            
            XmlTextWriter writer = new XmlTextWriter("products.xml", null);
            writer.Formatting = Formatting.Indented;
            doc.Save(writer);
            writer.Close();
        }
    }
}
